-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified state #78
Draft
mpretty-cyro
wants to merge
25
commits into
oxen-io:dev
Choose a base branch
from
mpretty-cyro:unified-state
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Unified state #78
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cleaned up the send and store hooks Added a batch merge function Added the ability to suppress triggering hooks (for use when triggering multiple changes at once) Added a function to handle the response from sending the 'send' hook data to the swarm Added code to route the config logging to it's parent state logger (if available and an explicit logger hasn't been set) Extracted the state C wrapper into it's own file to keep the main logic cleaner
# Conflicts: # src/session_encrypt.cpp
Moved the state-based functions back into their respective cpp files (class was getting too large) UserGroups & ConvoInfoVolatile C APIs running via the state object
Added a 'load_group_admin_key' function to make the relevant changes needed when getting promoted to admin. Fixed an issue where failing to handle a '_send' response wasn't setting the state error correctly. Fixed an issue where the 'prepare_push' wasn't signing group config requests correctly.
Fixed key supplement request verification data Fixed an issue where functions which triggered the send hook and had their own callbacks weren't reporting send failures correctly
jagerman
reviewed
Feb 28, 2024
Converting this back to a draft as it'll require a number of changes to be usable again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this PR is to consolidate the different config object types behind a single
State
class so clients only need to hold on to a single object instead of juggling multipleConfig
objects.This PR also attempts to abstract as much of the config change/update loop as it currently can via generic hooks (
on_send
/on_store
) and bulk processing methods (state.merge()
).In the future this class can be extended to include individual functions which result in changes across multiple configs in order to simplify the interface for the clients (eg. adding a member to a group).